package com.gxa.insurance.controller;

import com.gxa.insurance.pojo.MaintenanceData;
import com.gxa.insurance.service.MaintenanceDataService;
import com.gxa.insurance.util.JsonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @author 10076
 */
@Api(value = "快修店expressRepairShop相关的api接口")
@RestController
@RequestMapping("/MainData")
@CrossOrigin
public class MaintenanceDataController {
    @Autowired
    MaintenanceDataService maintenanceDataService;

    @ApiOperation(value = "维修资料添加信息",produces = "query")
    @PostMapping("/insertMainMsg")
    public Map insertMain(@RequestBody MaintenanceData maintenanceData){
        maintenanceDataService.insert(maintenanceData);
        JsonResult jsonResult =new JsonResult();
        jsonResult.setData("1");
        jsonResult.setMsg("添加成功");
        return jsonResult.getMap();
    }
}
